import { allColumnList } from '@/utils/netFileConst.js'

const getters = {
  sidebar: state => state.app.sidebar,
  language: state => state.app.language,
  menuCheck: state => state.app.menuCheck,
  menuFirstIndex: state => state.app.menuFirstIndex,
  navOneIndex: state => state.app.navOneIndex,
  navTwoIndex: state => state.app.navTwoIndex,
  size: state => state.app.size,
  device: state => state.app.device,
  visitedViews: state => state.tagsView.visitedViews,
  cachedViews: state => state.tagsView.cachedViews,
  token: state => state.user.token,
  user: state => state.user.user,
  roles: state => state.user.roles,
  routeTitle: state => state.permission.routeTitle,
  labelWidth: state => state.app.lableWidth,
  errorLogs: state => state.errorLog.logs,
  crumbs: state => state.common.crumbs,
  crumbsTwo: state => state.common.crumbsTwo,
  controlBtn: state => state.app.controlBtn,
  pickerOptions: state => state.common.pickerOptions,
  isCollapse: (state) => state.flow.isCollapse,
  supportColumn: (state) => state.flow.supportColumn,
  supportTags: (state) => state.flow.supportTags,
  onlineFormCache: (state) => state.flow.onlineFormCache,
  cachePages: (state) => state.flow.cachePages,
  clientHeight: (state) => state.flow.documentClientHeight,
  clienWidth: (state) => state.flow.documentClienWidth,
  mainContextHeight: (state) => state.flow.documentClientHeight - (state.flow.supportTags ? 130 : 90),
  messageTimeer: (state) => state.flow.messageTimeer,
  messageCount: (state) => state.flow.messageCount,
  selectedColumnList: (state) => state.netFile.selectedColumnList === null ? allColumnList : state.netFile.selectedColumnList.split(','),
  fileModel: (state) => state.netFile.fileModel === null ? 0 : Number(state.netFile.fileModel),
  gridSize: (state) => state.netFile.gridSize,
  remainderStorageValue: (state) => state.netFile.totalStorageValue - state.netFile.storageValue
}
export default getters
